/*
 * CeldaSDL.h
 *
 *  Created on: 23/10/2013
 *      Author: fernando
 */

#ifndef CELDASDL_H_
#define CELDASDL_H_

#include "Golosina.h"
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"



class CeldaSDL {
public:
	CeldaSDL();
	CeldaSDL(bool, unsigned int x, unsigned int y, unsigned int num);
	CeldaSDL(Golosina*, unsigned int x, unsigned int y, unsigned int num);
	bool setGolosina(Golosina*);
	bool setPosicion(unsigned int x, unsigned int y);
	virtual ~CeldaSDL();
	void dibujar(SDL_Surface* screen);
	void dibujarGolosina(SDL_Surface*);
	Golosina* getGolosina();
	unsigned int getPosX();
	unsigned int getPosY();
	bool getEstado();
	void vaciar();
	bool isVacia();
	unsigned int getNumero();

private:
	void setBackground();
	bool estado;
	//False es vacía, no se puede usar
	//True -> tiene una golosina o está vacía y tiene que colocarse golosina.
	Golosina* relleno;
	unsigned int posX;
	unsigned int posY;
	SDL_Surface* background;
	unsigned int numero;
};

#endif /* CELDASDL_H_ */
